/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package wsreg

import (
	"did-service/controller"

	"github.com/emicklei/go-restful"
)

func RegisterCredentialWebService(ws *restful.WebService, controller *controller.DidController) {
	ws.Route(ws.POST("/v1/credential/apply").To(controller.ApplyCredential))
	ws.Route(ws.POST("/v1/credential/revoke").To(controller.RevokeCredential))
	ws.Route(ws.GET("/v1/credential/revocation").To(controller.RevocationQuery))
	ws.Route(ws.GET("/v1/credential/acquire").To(controller.AcquireCredential))
	ws.Route(ws.GET("/v1/credential/page").To(controller.CredentialList))
	ws.Route(ws.GET("/v1/credential/list").To(controller.SimpleCredentialList))
	ws.Route(ws.GET("/v1/credential/revocation/page").To(controller.RevocationList))
	ws.Route(ws.GET("/v1/credential/detail/{credentialId}").To(controller.CredentialDetail))
	ws.Route(ws.GET("/v1/credential/claims/{credentialId}").To(controller.CredentialClaims))
	ws.Route(ws.GET("/v1/credential/{cptId}/{did}").To(controller.GetCredentialByDid))
}
